package com.zerocarbon.framework.common.constants;

/**
 * 全局公共常量
 * @author wyf  2020年5月30日
 */
public interface CommonConstant {
	
	//project version
	public final static String PROJECT_VERSION = "1.0";						//项目版本号(banner使用)
	
    public static final String TENANT_ID = "tenantId";						//租户id参数  企业标识Id
    
    public static final String SERVICENAME = "serviceName";					//请求服务名称
    public static final String METHODNAME = "methodName";						//方法名称
    public static final String PLATFORMFROM = "platformFrom";					//访问来源，pc端、app端、微信端等

    //标签
    public static final String HEADER_LABEL = "x-label";					//标签 header key
    public static final String HEADER_LABEL_SPLIT = ",";					//标签 header 分隔符
    public static final String LABEL_OR = "labelOr";						//标签或 名称
    public static final String LABEL_AND = "labelAnd";						//标签且 名称

    //权重key
    public static final String WEIGHT_KEY = "weight";						//权重key

    //状态
    public static final Integer STATUS_DEL = 1;							//删除
    public static final Integer STATUS_NORMAL = 0;							//正常
    public static final String STATUS_LOCK = "9";							//锁定

    //启用禁用
    public static final Integer ENABLE_YES = 1;                             //启用
    public static final Integer ENABLE_NO = 2;                              //禁用

    public static final Integer CATALOG = -1;								//目录	
    public static final Integer MENU = 1;									//菜单
    public static final Integer PERMISSION = 2;								//权限
    
    public static final String DEL_FLAG = "is_del";							//删除标记
    
    public static final String LBS_VERSION_HEADER = "x-lbs-version";		//负载均衡策略-版本号 信息头
    public static final String METADATA_VERSION = "grayversion";			//配置 注册中心元数据 版本号
    
    //字符编码 utf-8
    public static final String DEFAULT_CHARSET_UTF8 = "utf-8";
    //字符编码 gbk
    public static final String DEFAULT_CHARSET_GBK = "gbk";
    //默认签名字段名称
    public static final String DEFAULT_SIGN_PARAM = "sign";
    
    //cache时间
    public static final int cash_time = 60 * 60;
    public static final int long_cash_time = 24 * 30 * 60 * 60;
    public static final int sday_cash_time = 24 * 7 * 60 * 60;
    public static final int CACHE_ONE_DAY = 60 * 60 * 24;
    
    //方法类型
    public static final String METHOD_RETURN_VOID_TYPE = "void";
    
    public static final String LOCK_KEY_PREFIX = "LOCK_KEY:";
    
    //日期格式化   
    public final static String DEFAULT_DATE_FORMAT = "yyyy-MM-dd";
    public final static String DEFAULT_DATE2_FORMAT = "yyyyMMdd";
    public final static String DEFAULT_DATE3_FORMAT = "yyyy/MM/dd";
    public final static String DEFAULT_DATE4_FORMAT = "yyyy.MM.dd";
    public final static String DEFAULT_DATE5_FORMAT = "yyyy/MM";
    public final static String DEFAULT_DATE6_FORMAT = "yyyy.MM";
    public final static String DEFAULT_DATE7_FORMAT = "yyyy-MM";
    public final static String DEFAULT_DATE8_FORMAT = "yyyyMM";
    public final static String DEFAULT_TIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
    public final static String DEFAULT_TIME2_FORMAT = "yyyy-MM-dd HH:mm";
	public final static String DEFAULT_TIME3_FORMAT = "yyyyMMddHHmmss";
	public final static String DEFAULT_TIME4_FORMAT = "yyyy/MM/dd HH:mm:ss";
	public final static String DEFAULT_TIME5_FORMAT = "yyyy/MM/dd HH:mm";
	public final static String DEFAULT_TIME6_FORMAT = "yyyy.MM.dd HH:mm:ss";
	public final static String DEFAULT_TIME7_FORMAT = "yyyy.MM.dd HH:mm";
	public final static String[] DEFAULT_DATE_FORMAT_ARRAY = new String[] {DEFAULT_DATE_FORMAT, DEFAULT_DATE2_FORMAT, DEFAULT_DATE3_FORMAT, 
			DEFAULT_DATE4_FORMAT, DEFAULT_DATE5_FORMAT, DEFAULT_DATE6_FORMAT, DEFAULT_DATE7_FORMAT, DEFAULT_TIME_FORMAT, DEFAULT_TIME2_FORMAT, 
			DEFAULT_TIME3_FORMAT, DEFAULT_TIME4_FORMAT, DEFAULT_TIME5_FORMAT, DEFAULT_TIME6_FORMAT, DEFAULT_TIME7_FORMAT};
}
